Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve issue #1222: Cannot attach existing (but empty) logical volume to VM #1258

Merged
merged 1 commit into from
Apr 19, 2019

Conversation

a-a
Copy link
Contributor

@a-a a-a commented Oct 15, 2018

When attaching to existing logical volumes, the file is tested against a list of VALID_RAW_CONTENT which is not always completely sensible for cases where lvm is used to manage logical volumes.
As an example, the logical volume's "device" /dev/example-group/example-disk would be a symlink back to /dev/dm-1, and as the symlink is checked, it would fail validation.

This change adds a behavior to check if the file is a symlink, and if so, to check whether the symlink points back to a /dev/dm-* device, and if so, the device is considered valid. If the file is not a symlink, the original logic is retained.

as they are real devices on the system(usually disks!) let's
 not try and test them to see if they are a valid content
 just trust the kernel, it probably knows best.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants